Rewriting GetContext procedure on mono.