Possible polyfill for http://drupal.org/node/1170478