[Routing] Fixes INF problem on solaris.

cherry picked the fix, because we are using an older version.

This fixes owncloud/core#1661