You should surround lastfm parts with 
#ifdef HAVE_LIBLASTFM
#endif // HAVE_LIBLASTFM
as lastfm support is optional and can be deactivated at compilation time.