Fixes for Mac compile

Shared plugins will compile and install properly with these changes