Link to shared p4est and sc

This was done because static linking was not working on Mac OS X.