The problem is pretty simple. When building for W(P)8 you can't compile .c files or use old C syntax code (the one where function parameters are specified twice).
Libpng is easily compilable under C++ as it doesn't use old synax code but libz isn't. I haven't been able to find a suitable replacement for libz that can compile for these environments.
I tried MiniZ which lacks (dunno why) definitions for functions like inflatereset, then I found no solution to loading pngs alternatively under Windows Phone 8 from native C++ code (you can use WIC on Windows 8 but the library doesn't exist for ARM builds).
There's also this : https://github.com/doo/ZIP-WinRT but it uses managed classes and is only useful if you want to extract zip files. Previous libz dependent code won't compile and I need it for libpng to compile basically.
Please do not comment if you don't know what these flags mean
"Windows Store App support"
"Consume Windows runtime extension"