initial backport to scala 2.9