make unix compatible; fix for matlab without parallel toolbox
add extra checks to mex file
Merge pull request #9 from eendebakpt/master

make unix compatible; fix for matlab without parallel toolbox