Added condition to use png lib according to platform