Libya claims to foil military coup