Matlab

This set of patches fixes the compilation of Matlab bindings. Tested under linux (gcc 4.8.2 + Matlab 2013a) and Windows (MSVC 2010 + Matlab 2014a).