Relative path fix for FreeBSD and Solaris
Fix declaration
Fix declaration again
Tested on solaris