Made cross platform on Windows (VS2013), Linux (GCC 4.8) and MAC OS X (GCC 4.8).