Fixed the bug introduced by myself when fixing deprecated access to png_info of libpng, fixed miscellaneous compilation errors/warnings given by clang++