Fixed build under gcc4.7.2. Not tested on other compilers