fixing libpng build issues