Fixes routing for solaris.

Fixes INF problem on solaris (for me). Should now fix #5027.