Merge pull request #688 from mattconnolly/master

This pull requests fixes building on SmartOS and possibly other Solaris-like systems
config for libsodium in alternate path, using CPP flags for both C and C++ sources.