Use optimoptions instead of otimset as recommended in never versions of matlab

http://www.mathworks.se/help/optim/ug/optimoptions-and-optimset.html
Use -nodesktop instead of -nojvm when calling matlab. -nojvm prevents the use of handle graphics in newer versions of Matlab
Removed platform specific extension of library file.
Merge pull request #1 from melund/master

Make compatible with Matlab R2013a