Makefile: fix shared library on some Linux systems