Fixes bjorn/tiled#510 issue where tmxrasterizer doesn't return >0 on error

This should fix issue bjorn/tiled#510 but is completely untested as I don't have an environment set up. I'm also not a C++ dev :)