Add missing link flags for regetest
Compile cleanly with all the warnings