Allow free functions as member functions

Added the functionality to use free functions with a fitting
first parameter as member functions.