Fascination with pirates goes back centuries