rename `as` method to `asUnits`

In Qml's javascript `as` is a reserved keyword.  This patch allows the
library to play nice in this environment.