Cherry-picked from the OpenBSD ports tree.

  Append to LDFLAGS / CPPFLAGS rather than replacing them.
  Write the variable get/sets to the debug log.

  This is interesting to see how many times we do so.
  Log the date/time of each debug message too.

  This makes it more obvious which is "new" vs. "old".