Fiddled with compile settings to make it build on OS X under gcc 4.8... but you know, not it a portable way...