Remove LDLIBS files that specify libraries we don't need.

Instead split up LDFLAGS into LDLIBS with the posix_error_mapper and
LDFLAGS with the B_USE_POSITIVE_POSIX_ERRORS define.
Fix call to setpgrp().

I can't find a version documented anywhere that takes any arguments.