Fixes for clean compilation on MacOSX Mavericks. Also fixes some bugs discovered by Clang.
Proper fix to xref
Merge branch '2.0' of http://github.com/Eigenlabs/EigenD into 2.0