Fix some consistency issues in handling libpng, etc. deps