Allow variables in the libperl Makefile snippet

This makes it easier to add an soname flag, if desired.
Set an soname on libperl.so

This is considered good practise and as such is required by
Gentoo. Changing the soname is dangerous but setting one where there
wasn't one previously should be harmless.