Fix double-free when rendering BMPs with 24,32 bit colour (fixes #5, thanks @danieltian)