Improved cross-plugin surface support, fixed PNG saving on libpng 1.6