Fix zlib; fix imagelib; fix Makefile; add sdl and x11 platforms;add window resize support