Build tweaks, and make lib more friendly for export (no tests).