Why build the link yourself, when you can just add the class to the result of get_next_posts_link()
?
add_filter('next_posts_link_attributes','example_add_next_link_class');
function example_add_next_link_class($attr) {
return $attr . ' class="example-class"';
}
Now the link sent back by get_next_posts_link()
will have your class in it.