Fixed explicit instantiation problem when compiling as header-only.