(core:build) fixes for win32
(core) switched img png interface to FILE* to avoid fdopen/win32
annoyances.