Compiling via cmake with MSVC

Modified cmake scripts and added the finder module for pthread and mkl.
One modification in the source to successfully compile.