Solves CoW friendly problem on MRI 2.2 and later.
