Fix issues with Visual Studio 2012

I admit the assert function fix looks more like a quick'n'dirty hack ;-)