BZ 1088032 - use "command" not "type" since "command" is POSIX compliant and is available on Solaris as well as other UNIX flavors. Don't use readlink unless we know it is available, to avoid spitting out those error messages.
Tested on Solaris 10 ("uname -sr" returns "SunOS 5.10") and readlink does not exist, but "command -v" works so this fix should work on Solaris 10.