Fix undefined reference at the linking stage