Fix issue #22 and #23

Checked on following environments / compilers :

 - Linux / g++ 4.6.4
 - Linux / g++ 4.8.1
 - Linux / clang++ 3.4

 - Windows / Visual C++ 2012
 - Windows / Visual C++ 2013

TODO : Mac OS / clang++