updated to allow optional and conditional building of tests
updated flags for ubunutu
Merge pull request #288 from makeclean/fix_tests

Fix tests