Fix colorspace conversion on OSX