It is an old topic. Not sure if it will be helpful to Warren et al. Just wants to share my experience struggling with hap-nodejs with my omega2+. Obviously you need to setup the compilers on the omega2+. Please see the documentation on setting up a compiler for details. It turns out that 128M ram does not cut it either. So you also need to set up a swap file or a swap partition. Again, please check the documentation for how to do that. At last, Omega2's C compiler does not need the -lpthread. In fact, there is no libpthread provided. Just create a dummy libpthread.so, like using a C file as this:
static void __dummy()
then move the created libpthread.so to /usr/lib.
Hopefully you will then have a working hap-nodejs.