KVO to compute the gradient

I did this fix quickly, there might be a better fix, though. I
preferred the overridden setters, though. Anyway, thanks.

Please accept this fix and update the podspec, please. My project is linked against your pod, any time I `pod install` I loose the changes.

Thanks
Colas