Makefile: Fix shared library building on various OSes

Versioned for OS not in (Windows, Android), and create a .dll.a implib on Windows