Fixed compiling on OSX, also fixes DDVTECH/mistlib#1