Use objectpath more genericallyto fix requirejs issues