Add a test for VMPort's type
Synchronize calls using the environment variables

* As the underlying C functions are not thread-safe.
* See http://en.cppreference.com/w/cpp/utility/program/getenv.
Merge pull request #192 from eregon/mvm

Make environment variables thread-safe