::readlink() needs unistd.h

this is included in some gcc headers, but not in c++11 mode, that is the
reason why we did not get a compile error so far.
Do not use tr1 with libc++

clang defines __GNUC__ but libc++ does not have tr1, so we either need to use
boost, or std and compile in c++11 mode.