attachECParams: use bind() instead of inline functions

Using `bind()` is much more elegant and shorter than the current block of inline functions, but `bind` is somewhat slower than the current implementation.

I think that in this case its worth optimizing for readability rather than for CPU time. What do you think?