Allow test suite to run in dash shell.
Move test libs to end of linking line to work in Ubuntu - need to test in Arch.