ENH: add some cmake docs and fix build with socklen_t