Fixed grayscale png loading. This fix may have bumped the required version of libpng to 1.4 although I never actually checked which version was required.