Fix build on systems without RTM_OLDADD or RTM_OLDDEL

For example, FreeBSD has removed these constants from its API
in March 2014, with the message:
Garbage collect long time obsoleted (or never used) stuff from routing API

Only attempt to define behavior for these cases if they are defined.

ticket: 7955 (new)
tags: pullup
target_version: 1.12.2