attachECParams: use bind() instead of inline functions