Skip building when matlab is not installed

This makes the path to the matlab installation configurable and skips building the executable if the path doesn't exist.

Can someone please verify that this doesn't break the build with matlab installed?