libslc: Implement snprintf