In addition to the two mentioned solutions (IPC, and compilation of ROS code against MATLAB version) there is a possible third solution.
3) A possible third solution would be to reimplement the communication functionality of ROS completely within MATLAB (e.g. by copy/pasting)
part of the ROS code (not sure if the license model allows this) and be independent of the ROS Buildsystem in general. In comparison to the previous two, this solution would require an tremendous amount of work to be realized and currently I cannot see how a single person should be able to do this in his/her spare time. However, a big advantage of this solution would be to be independent of the ROS Buildsystem and its (current) restrictions. Out of completeness I wanted to mention this possibility, but considering the work/gain tradeoff this solution does not seem viable to me.