More NaCl related fixes

* fix shared/static configuration which was still wrong
* hopefully fix linking issues on *BSD systems