Correct friend function declarations with default arguments

Apple updated the clang compiler toolchain again, and it seems clang is getting more strict as time goes  on. I think the change is fairly self explanatory, c++ standard §8.3.6.4 does not allow friend functions with default arguments. A quick and simple workaround it simply to use forward declarations in such instances.

This PR should not have any API or semantic changes.