Fix underlinking with USE_SHARED_ALLEGRO4=ON
Merge pull request #516 from hasufell/underlinking_fix

Link with platforms libs when USE_SHARED_ALLEGRO4=ON (fix #513, #514)