Implement WebIDL method overloads. Fixes #540.