Fixed broken build on Linux.

Solver wasn't compiling because apparently gyp automatically adds
-fno-exceptions flag to Makefile. This commit disables this behavior.
It also added a platform check, so that configure.py can execute
nw-gyp commands correctly.