ninja/mac: Don't write emtpy postbuild variable for non-bundle links.
ninja/mac: Don't write emtpy postbuild variable for non-bundle links.

Refactor the "only write a postbuild if needed" bit into a new function.

No functionality change, except for minusculely smaller generated ninja files.

R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/21939002
old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google