delay incrementing Thread::criticalLevel until after entering ActiveState

If we increment the value while we're still in IdleState, another
thread may try to GC before we are able to enter ActiveState, which
will lead to an assertion failure when the footprint function is
called.
don't specify -Wl,-rpath argument on Darwin or Windows

It remains to be seen what form that argument should take on those
operating systems; for now, it only causes trouble, so we'll just
leave it out.