Some changes

Tried to make it compile with MSVC. However, there is still too little
C++11 features implemented for it to work. It should work with VS2013.
For now compile with g++-4.8 or mingw-4.8