Fix compile error on Linux

GCC errored at intrusive_ptr_add_ref/release saying they were not declared. Moving them above includes somehow fixed this...