Build libxs statically and use XS_STATIC flag in header files