Don't replace '$' at last position in class names

Alone with dacb8631d3095416ea0b9d332f9a6f11ffb6d62a, this patch enables Haxe to access Scala singleton.

``` haxe
@:native("scala.collection.mutable.Set$")
extern class SetSingleton
{

  @:native("MODULE$")
  public static var singletonInstance(default, null):SetSingleton;

}
```