Fix underlinking with USE_SHARED_ALLEGRO4=ON

see #513