Partial solaris support

This pull request are easy to audit changes, other clean up & makefile modification (remove unsupported -Wl,-z,relro in LDHARDENING, add/mod libs) are still required.

on my build env, I have to explicitly specify std::map for every map,
and disable literals in c++11, see http://en.wikipedia.org/wiki/C%2B%2B11#User-defined_literals,
which can be done via this batch hack:
```
sed -i "s/map</std::map</g" *.cpp *.h
sed -i "s/std::std::map</std::map</g" *.cpp *.h
sed -i "s/multistd::map</multimap</g" *.cpp *.h
sed -i "s/limitedstd::map</limitedmap</g" *.cpp *.h
sed -i "s/\"PRI/\" PRI/g" *.cpp *.h
```

then the code will work with either CXXFLAGS=-std=c++11 or unmodified CXXFLAGS(no c++11 enabled).