Correct LDFLAGS macros, get initial build right - test fails on libperl link