resolve warning: assignment discards 'const' qualifier from pointer target type

Fixes #245