Fix bug to allow static library creation

Having the body of the functions in a c file instead of a header to avoid redefining them when a static library is created.