Fixed mocking functions with arguments passed by reference

see issue #33