apng extension fix (fix #1076)