add -no-undefined flag for g++
minor cleanup