move GenericProxy constructor to RCPP_API_CLASS macro