Fixed few bugs related to build system and POSIX compatabilty.
Linking against static asan library was a mistake. Now this should work better for other compilers. Also added script for running all tests under different profiles.